var mongoose = require("mongoose");

//回答表(answerOnlineDraft)

var answerOnlineDraftSchema = new mongoose.Schema({
  articleId: {
    type: mongoose.SchemaTypes.ObjectId,
    required: true
  }, //文章id
  content: {
    type: String,
    required: true
  }, //富文本内容
  userid: {
    type: mongoose.SchemaTypes.ObjectId,
    ref: "user_login",
    required: true
  }, //用户id
  problemData: {
    type: String,
  }, //回答标题
  deleImgId: {
    type: Array,
    default: []
  }, //需要删除的图片
});

module.exports = mongoose.model("answerOnlineDraft", answerOnlineDraftSchema);